package com.stylefeng.guns.modular.vpn_exclusive_line_manage.dao;

import com.stylefeng.guns.modular.vpn_exclusive_line_manage.entity.ExclusiveLineDO;
import com.stylefeng.guns.modular.vpn_exclusive_line_manage.dto.PackageDTO;
import com.stylefeng.guns.modular.vpn_exclusive_line_manage.entity.ExclusiveLinePackageDO;
import com.stylefeng.guns.modular.vpn_exclusive_line_manage.entity.ExclusiveLineUserDO;
import com.stylefeng.guns.modular.vpn_exclusive_line_manage.entity.VpnServerDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ExclusiveLineMapper {
    List<ExclusiveLineDO> findList(@Param("start") Integer start,
                                   @Param("count") Integer count);
    Integer findTotalCount();
    Integer findPackageCount(@Param("serverId") String serverId,
                             @Param("userId") String userId);
    void addExclusivePackage(@Param("items") List<PackageDTO> items);
    void deleteExclusivePackage(@Param("serverId") String serverId,
                                @Param("userId") String userId);
    void deleteExclusivePackageByServerId(@Param("serverId") Integer serverId);
    List<ExclusiveLineUserDO> findExclusiveLineUsers(@Param("serverId") String serverId);
    ExclusiveLinePackageDO findExclusiveLinePackage(@Param("serverId") Integer serverId);
    ExclusiveLineDO findExclusiveLine(@Param("serverId") Integer serverId);
    List<VpnServerDO> findEnableExclusiveServer();
}
